package com.learn.file;

import java.io.FileReader;

public class TestReader {
    public static void main(String[] args) throws Exception{
        FileReader reader = new FileReader("reader.txt");
        int len;
//        while ((len=reader.read()) != -1){
//            System.out.print((char)len);
//        }

        char[] bytes = new char[20];

        while ((len=reader.read(bytes)) != -1){
            System.out.println(new String(bytes, 0, len));
        }

    }
}
